<xs:schema targetNamespace="urn:nhibernate-mapping-2.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:nhibernate-mapping-2.2" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:simpleType name="polymorphismType">
		<xs:annotation>
			<xs:documentation>Types of polymorphism</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="implicit" />
			<xs:enumeration value="explicit" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="outerJoinStrategy">
		<xs:restriction base="xs:string">
			<xs:enumeration value="auto" />
			<xs:enumeration value="true" />
			<xs:enumeration value="false" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="fetchMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="select" />
			<!-- equivalent to outer-join="false" -->
			<xs:enumeration value="join" />
			<!-- equivalent to outer-join="true" -->
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="collectionFetchMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="select" />
			<!-- equivalent to outer-join="false" -->
			<xs:enumeration value="join" />
			<!-- equivalent to outer-join="true" -->
			<xs:enumeration value="subselect" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="flushMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="auto" />
			<xs:enumeration value="never" />
			<!-- <xs:enumeration value="always" /> - not implemented yet -->
			<xs:enumeration value="always" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="optimisticLockMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="none" />
			<xs:enumeration value="version" />
			<xs:enumeration value="dirty" />
			<xs:enumeration value="all" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="lockMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="none" />
			<xs:enumeration value="read" />
			<xs:enumeration value="upgrade" />
			<xs:enumeration value="upgrade-nowait" />
			<xs:enumeration value="write" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="laziness">
		<xs:restriction base="xs:string">
			<xs:enumeration value="false" />
			<xs:enumeration value="proxy" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="versionGeneration">
		<xs:restriction base="xs:string">
			<xs:enumeration value="never" />
			<xs:enumeration value="always" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="propertyGeneration">
		<xs:restriction base="xs:string">
			<xs:enumeration value="never" />
			<xs:enumeration value="insert" />
			<xs:enumeration value="always" />
		</xs:restriction>
	</xs:simpleType>
	<!--
		This is the same as laziness for now, but H3.2 allows lazy="no-proxy"
		in some elements but not in others, so separate types are used.
	-->
	<xs:simpleType name="restrictedLaziness">
		<xs:restriction base="xs:string">
			<xs:enumeration value="false" />
			<xs:enumeration value="proxy" />
		</xs:restriction>
	</xs:simpleType>
	<xs:attributeGroup name="baseClassAttributes">
		<xs:attribute name="name" type="xs:string" use="required" />
		<xs:attribute name="proxy" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>default: no proxy interface</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="lazy" type="xs:boolean" use="optional">
			<xs:annotation>
				<xs:documentation>Enable the lazy loading of this class in associations</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="dynamic-update" type="xs:boolean" use="optional" default="false" />
		<xs:attribute name="dynamic-insert" type="xs:boolean" use="optional" default="false" />
		<xs:attribute name="select-before-update" type="xs:boolean" use="optional" default="false" />
		<xs:attribute name="abstract" type="xs:boolean" />
	</xs:attributeGroup>
	<xs:attributeGroup name="baseCollectionAttributes">
		<xs:attribute name="name" type="xs:string" use="required" />
		<xs:attribute name="access" type="xs:string" use="optional" />
		<xs:attribute name="table" type="xs:string" use="optional" />
		<xs:attribute name="schema" type="xs:string" use="optional" />
		<xs:attribute name="lazy" type="xs:boolean" use="optional">
			<xs:annotation>
				<xs:documentation>Enable the lazy loading of this collection</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="outer-join" type="outerJoinStrategy" use="optional" />
		<xs:attribute name="fetch" type="collectionFetchMode" use="optional" />
		<xs:attribute name="cascade" type="xs:string" use="optional" />
		<xs:attribute name="where" type="xs:string" use="optional" />
		<xs:attribute name="inverse" type="xs:boolean" use="optional" default="false" />
		<xs:attribute name="persister" type="xs:string" use="optional" />
		<xs:attribute name="batch-size" type="xs:positiveInteger" use="optional" default="1" />
		<xs:attribute name="check" type="xs:string" use="optional" />
		<xs:attribute name="collection-type" type="xs:string" use="optional" />
		<xs:attribute name="optimistic-lock" type="xs:boolean" use="optional" />
		<xs:attribute name="generic" type="xs:boolean" use="optional">
			<xs:annotation>
				<xs:documentation>The concrete collection should use a generic version or an object-based version.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>
	<xs:element name="filter">
		<xs:complexType mixed="true">
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="condition" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:complexType name="cacheType">
		<xs:attribute name="region" type="xs:string" use="optional" />
		<xs:attribute name="usage" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="read-only" />
					<xs:enumeration value="read-write" />
					<xs:enumeration value="nonstrict-read-write" />
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>
	<xs:simpleType name="unsavedValueType">
		<xs:annotation>
			<xs:documentation>Values used to restrict composite-id, does not apply to meta/column/generator</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="any" />
			<xs:enumeration value="none" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="notFoundMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ignore" />
			<xs:enumeration value="exception" />
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="customSQL" mixed="true">
		<!--<xs:attribute name="callable" type="xs:boolean" use="optional" default="false" />-->
		<xs:attribute name="check" type="customSQLCheck" use="optional" />
	</xs:complexType>
	<xs:element name="sql-insert" type="customSQL" />
	<xs:element name="sql-update" type="customSQL" />
	<xs:element name="sql-delete" type="customSQL" />
	<xs:element name="sql-delete-all" type="customSQL" />
	<xs:simpleType name="customSQLCheck">
		<xs:restriction base="xs:string">
			<xs:enumeration value="none" />
			<xs:enumeration value="rowcount" />
			<!-- <xs:enumeration value="param" /> -->
		</xs:restriction>
	</xs:simpleType>
	<xs:element name="loader">
		<xs:complexType>
			<xs:attribute name="query-ref" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:group name="classCustomSQL">
		<xs:sequence>
			<xs:element ref="loader" minOccurs="0" maxOccurs="1" />
			<xs:element ref="sql-insert" minOccurs="0" maxOccurs="1" />
			<xs:element ref="sql-update" minOccurs="0" maxOccurs="1" />
			<xs:element ref="sql-delete" minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:group>
	<xs:group name="collectionCustomSQL">
		<xs:sequence>
			<xs:element ref="loader" minOccurs="0" maxOccurs="1" />
			<xs:element ref="sql-insert" minOccurs="0" maxOccurs="1" />
			<xs:element ref="sql-update" minOccurs="0" maxOccurs="1" />
			<xs:element ref="sql-delete" minOccurs="0" maxOccurs="1" />
			<xs:element ref="sql-delete-all" minOccurs="0" maxOccurs="1" />
		</xs:sequence>
	</xs:group>
	<xs:element name="resultset">
		<xs:complexType>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="return-scalar" />
				<xs:element ref="return" />
				<xs:element ref="return-join" />
				<xs:element ref="load-collection" />
			</xs:choice>
			<xs:attribute name="name" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="hibernate-mapping">
		<xs:annotation>
			<xs:documentation>hibernate-mapping is the document root</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="import" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="class" />
					<xs:element ref="subclass" />
					<xs:element ref="joined-subclass" />
					<xs:element ref="union-subclass" />
				</xs:choice>
				<xs:element ref="resultset" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="query" />
					<xs:element ref="sql-query" />
				</xs:choice>
				<xs:element ref="filter-def" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="database-object" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="schema" type="xs:string" use="optional" />
			<xs:attribute name="default-cascade" type="xs:string" use="optional" default="none" />
			<xs:attribute name="default-access" type="xs:string" use="optional" default="property">
				<xs:annotation>
					<xs:documentation>Default property access setting</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="auto-import" type="xs:boolean" use="optional" default="true" />
			<xs:attribute name="namespace" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>Namespace used to find not-Fully Qualified Type Names</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="assembly" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>Assembly used to find not-Fully Qualified Type Names</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="default-lazy" type="xs:boolean" use="optional" default="true">
				<xs:annotation>
					<xs:documentation>Default value of the lazy attribute for persistent classes and collections</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="filter-param">
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="type" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="filter-def">
		<xs:complexType mixed="true">
			<xs:sequence>
				<xs:element ref="filter-param" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="condition" type="xs:string" use="optional" default="" />
		</xs:complexType>
	</xs:element>
	<xs:element name="create">
		<xs:complexType mixed="true" />
	</xs:element>
	<xs:element name="drop">
		<xs:complexType mixed="true" />
	</xs:element>
	<xs:element name="dialect-scope">
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="definition">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="database-object">
		<xs:complexType>
			<xs:sequence>
				<xs:choice>
					<xs:sequence>
						<xs:element ref="create" />
						<xs:element ref="drop" />
					</xs:sequence>
					<xs:sequence>
						<xs:element ref="definition" />
					</xs:sequence>
				</xs:choice>
				<xs:element ref="dialect-scope" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="import">
		<xs:annotation>
			<xs:documentation>An explicit query language "import"</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="class" type="xs:string" use="required" />
			<xs:attribute name="rename" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="class">
		<xs:annotation>
			<xs:documentation>Root of an entity class hierarchy. Entities have their own tables</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0">
					<xs:element ref="jcs-cache" />
					<xs:element ref="cache" />
				</xs:choice>
				<xs:choice>
					<xs:element ref="id" />
					<xs:element ref="composite-id" />
				</xs:choice>
				<xs:element ref="discriminator" minOccurs="0" />
				<xs:choice minOccurs="0">
					<xs:element ref="version" />
					<xs:element ref="timestamp" />
				</xs:choice>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:choice>
					<xs:sequence>
						<xs:element ref="join" minOccurs="0" maxOccurs="unbounded" />
						<xs:element ref="subclass" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:element ref="joined-subclass" minOccurs="0" maxOccurs="unbounded" />
					<xs:element ref="union-subclass" minOccurs="0" maxOccurs="unbounded" />
				</xs:choice>
				<xs:group ref="classCustomSQL" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseClassAttributes" />
			<xs:attribute name="table" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>default: unqualified classname</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="schema" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>default: no value</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="discriminator-value" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>default: unqualified class name | none</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="mutable" type="xs:boolean" use="optional" default="true" />
			<xs:attribute name="polymorphism" type="polymorphismType" use="optional" default="implicit" />
			<xs:attribute name="persister" type="xs:string" use="optional" />
			<xs:attribute name="where" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>default: none</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="batch-size" type="xs:positiveInteger" use="optional" default="1" />
			<xs:attribute name="optimistic-lock" type="optimisticLockMode" use="optional" default="version" />
			<xs:attribute name="check" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="id">
		<xs:annotation>
			<xs:documentation>Declares the id type, column and generation algorithm for an entity class. If a name attribute is given, the id is exposed to the application through the named property of the class. If not, the id is only exposed to the application via Session.getIdentifier()</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="generator" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="unsaved-value" type="xs:string">
				<xs:annotation>
					<xs:documentation>any|none|null|0|-1|...</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="composite-id">
		<xs:annotation>
			<xs:documentation>A composite key may be modelled by a .NET class with a property for each key column. The class must be Serializable and override equals() and hashCode()</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:choice maxOccurs="unbounded">
					<xs:element ref="key-property" />
					<xs:element ref="key-many-to-one" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="unsaved-value" type="unsavedValueType" default="none" />
		</xs:complexType>
	</xs:element>
	<xs:element name="discriminator">
		<xs:annotation>
			<xs:documentation>Polymorphic data requires a column holding a class discriminator value. This value is not directly exposed to the application</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0">
					<xs:annotation>
						<xs:documentation>default: "class"|none</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="type" type="xs:string" default="String" />
			<xs:attribute name="not-null" type="xs:boolean" default="true" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="force" type="xs:boolean" default="false" />
			<xs:attribute name="insert" type="xs:boolean" />
			<xs:attribute name="formula" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="version">
		<xs:annotation>
			<xs:documentation>Versioned data requires a column holding a version number. This is exposed to the application through a property of the .NET class</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="type" type="xs:string" default="Int32" />
			<xs:attribute name="unsaved-value" type="xs:string">
				<xs:annotation>
					<xs:documentation>undefined|any|none|null|0|-1|... </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="generated" type="versionGeneration" default="never" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="timestamp">
		<xs:annotation>
			<xs:documentation>Is equivalent to &lt;version type="timestamp"&gt;</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="unsaved-value" type="xs:string">
				<xs:annotation>
					<xs:documentation>undefined|any|none|null|0|-1|... </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="generated" type="versionGeneration" default="never" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="subclass">
		<xs:annotation>
			<xs:documentation>Subclass declarations are nested beneath the root class declaration to achieve polymorphic persistence</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:element ref="join" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subclass" minOccurs="0" maxOccurs="unbounded" />
				<xs:group ref="classCustomSQL" />
			</xs:sequence>
			<xs:attributeGroup ref="baseClassAttributes" />
			<xs:attribute name="extends" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>Name of the root class. Required if the Subclass is declared outside the declaration of its root class</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="discriminator-value" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>default: unqualified class name | none</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="joined-subclass">
		<xs:annotation>
			<xs:documentation>Joined subclasses are used for the normalized table-per-subclass mapping strategy</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="key" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:element ref="joined-subclass" minOccurs="0" maxOccurs="unbounded" />
				<xs:group ref="classCustomSQL" />
			</xs:sequence>
			<xs:attributeGroup ref="baseClassAttributes" />
			<xs:attribute name="extends" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>Name of the root class. Required if the Joined Subclass is declared outside the declaration of its root class</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="schema" type="xs:string" use="optional" />
			<xs:attribute name="table" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>default: unqualified classname</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="check" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="join">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="key" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="table" type="xs:string">
			</xs:attribute>
			<xs:attribute name="schema" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>default: no value</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="fetch" type="fetchMode" use="optional" />
			<xs:attribute name="inverse" type="xs:boolean" use="optional" default="false" />
			<xs:attribute name="optional" type="xs:boolean" use="optional" default="false" />
		</xs:complexType>
	</xs:element>
	<xs:element name="property">
		<xs:annotation>
			<xs:documentation>Property of an entity class or component, component-element, composite-id, etc. Class Properties (get_ and set_ methods) are mapped to table columns</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="type" minOccurs="0" maxOccurs="1" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="not-null" type="xs:boolean" default="false" />
			<xs:attribute name="unique" type="xs:boolean" default="false" />
			<xs:attribute name="update" type="xs:boolean">
				<xs:annotation>
					<xs:documentation>only supported for properties of a class (not component)</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="insert" type="xs:boolean">
				<xs:annotation>
					<xs:documentation>only supported for properties of a class (not component)</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="optimistic-lock" type="xs:boolean" default="true">
				<xs:annotation>
					<xs:documentation>only supported for properties of a class (not component)</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="formula" type="xs:string">
				<xs:annotation>
					<xs:documentation>only supported for properties of a class (not component)</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="unique-key" type="xs:string" />
			<xs:attribute name="index" type="xs:string" />
			<xs:attribute name="generated" type="propertyGeneration" default="never" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="meta-value">
		<xs:complexType>
			<xs:attribute name="value" type="xs:string" use="required" />
			<xs:attribute name="class" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="any">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="meta-value" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="id-type" type="xs:string" use="required" />
			<xs:attribute name="meta-type" type="xs:string" />
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="insert" type="xs:boolean" />
			<xs:attribute name="update" type="xs:boolean" />
			<xs:attribute name="cascade" type="xs:string" default="none" />
			<xs:attribute name="index" type="xs:string" use="optional" />
			<xs:attribute name="unique-key" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="array">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0">
					<xs:element ref="jcs-cache" />
					<xs:element ref="cache" />
				</xs:choice>
				<xs:element ref="key" />
				<xs:element ref="index" />
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="table" type="xs:string" />
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="element-class" type="xs:string" />
			<xs:attribute name="cascade" type="xs:string" />
			<xs:attribute name="where" type="xs:string" />
			<xs:attribute name="optimistic-lock" type="xs:boolean" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="cache" type="cacheType" />
	<xs:element name="collection-id">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="generator" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" use="required" />
			<xs:attribute name="type" type="xs:string" use="required" />
			<xs:attribute name="length" type="xs:positiveInteger" />
		</xs:complexType>
	</xs:element>
	<xs:element name="column">
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="not-null" type="xs:boolean" />
			<xs:attribute name="unique" type="xs:boolean" />
			<xs:attribute name="unique-key" type="xs:string" />
			<xs:attribute name="sql-type" type="xs:string" />
			<xs:attribute name="index" type="xs:string" />
			<xs:attribute name="check" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="component">
		<xs:annotation>
			<xs:documentation>Map properties of a child object to columns of the table of a parent class</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="parent" minOccurs="0" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="update" type="xs:boolean" />
			<xs:attribute name="insert" type="xs:boolean" />
		</xs:complexType>
	</xs:element>
	<xs:element name="dynamic-component">
		<xs:complexType>
			<xs:sequence>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="update" type="xs:boolean" />
			<xs:attribute name="insert" type="xs:boolean" />
		</xs:complexType>
	</xs:element>
	<xs:element name="composite-element">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="parent" minOccurs="0" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="nested-composite-element" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="composite-index">
		<xs:complexType>
			<xs:sequence>
				<xs:choice maxOccurs="unbounded">
					<xs:element ref="key-property" />
					<xs:element ref="key-many-to-one" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="element">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="type" type="xs:string" use="required" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="not-null" type="xs:boolean" default="false" />
			<xs:attribute name="unique" type="xs:boolean" default="false" />
		</xs:complexType>
	</xs:element>
	<xs:element name="generator">
		<xs:annotation>
			<xs:documentation>Tells which algorithm to use to generate the identifier</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="idbag">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0">
					<xs:element ref="jcs-cache" />
					<xs:element ref="cache" />
				</xs:choice>
				<xs:element ref="collection-id" />
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:group ref="collectionCustomSQL" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
			<xs:attribute name="order-by" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="index">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="list-index">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="base" type="xs:positiveInteger" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="index-many-to-any">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="id-type" type="xs:string" use="required" />
			<xs:attribute name="meta-type" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="index-many-to-many">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" use="required" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="foreign-key" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="jcs-cache" type="cacheType" />
	<xs:element name="key">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="foreign-key" type="xs:string" use="optional" />
			<xs:attribute name="property-ref" type="xs:string" use="optional" />
			<xs:attribute name="on-delete" type="ondelete" />
		</xs:complexType>
	</xs:element>
	<xs:element name="key-many-to-one">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="foreign-key" type="xs:string" use="optional" />
			<xs:attribute name="lazy" type="restrictedLaziness" use="optional" />
			<xs:attribute name="not-found" type="notFoundMode" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="key-property">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
		</xs:complexType>
	</xs:element>
	<xs:element name="many-to-any">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta-value" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="id-type" type="xs:string" use="required" />
			<xs:attribute name="meta-type" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="many-to-many">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" use="required" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="foreign-key" type="xs:string" use="optional" />
			<xs:attribute name="outer-join" type="outerJoinStrategy" use="optional" />
			<xs:attribute name="fetch" type="fetchMode" use="optional" />
			<xs:attribute name="not-found" type="notFoundMode" use="optional" />
			<xs:attribute name="where" type="xs:string" use="optional" />
			<xs:attribute name="lazy" type="restrictedLaziness" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="many-to-one">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="not-null" type="xs:boolean" default="false" />
			<xs:attribute name="unique" type="xs:boolean" default="false" />
			<xs:attribute name="unique-key" type="xs:string" />
			<xs:attribute name="index" type="xs:string" />
			<xs:attribute name="cascade" type="xs:string" />
			<xs:attribute name="outer-join" type="outerJoinStrategy" use="optional" />
			<xs:attribute name="fetch" type="fetchMode" use="optional" />
			<xs:attribute name="update" type="xs:boolean" />
			<xs:attribute name="insert" type="xs:boolean" />
			<xs:attribute name="foreign-key" type="xs:string" use="optional" />
			<xs:attribute name="property-ref" type="xs:string" />
			<xs:attribute name="not-found" type="notFoundMode" use="optional" />
			<xs:attribute name="lazy" type="laziness" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="meta">
		<xs:complexType mixed="true">
			<xs:attribute name="attribute" type="xs:string" use="required" />
			<xs:attribute name="inherit" type="xs:boolean" default="true" />
		</xs:complexType>
	</xs:element>
	<xs:element name="nested-composite-element">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="parent" minOccurs="0" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="nested-composite-element" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" use="required" />
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="one-to-many">
		<xs:complexType>
			<xs:attribute name="class" type="xs:string" use="required" />
			<xs:attribute name="not-found" type="notFoundMode" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="one-to-one">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="cascade" type="xs:string" />
			<xs:attribute name="outer-join" type="outerJoinStrategy" use="optional" />
			<xs:attribute name="fetch" type="fetchMode" use="optional" />
			<xs:attribute name="constrained" type="xs:boolean" default="false" />
			<xs:attribute name="foreign-key" type="xs:string" use="optional" />
			<xs:attribute name="property-ref" type="xs:string" />
			<xs:attribute name="lazy" type="laziness" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="param">
		<xs:complexType mixed="true">
			<xs:attribute name="name" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="parent">
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="primitive-array">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0">
					<xs:element ref="jcs-cache" />
					<xs:element ref="cache" />
				</xs:choice>
				<xs:element ref="key" />
				<xs:element ref="index" />
				<xs:element ref="element" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="table" type="xs:string" />
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="where" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="query">
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="query-param" />
			</xs:choice>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="flush-mode" type="flushMode" use="optional" />
			<xs:attribute name="cache-mode" type="cacheMode" />
			<xs:attribute name="cacheable" type="xs:boolean" />
			<xs:attribute name="cache-region" type="xs:string" />
			<xs:attribute name="fetch-size" type="xs:int" />
			<xs:attribute name="timeout" type="xs:int" />
			<xs:attribute name="read-only" type="xs:boolean" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="return-discriminator" minOccurs="0" maxOccurs="1" />
				<xs:element ref="return-property" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="alias" type="xs:string" use="optional" />
			<xs:attribute name="class" type="xs:string" use="optional" />
			<xs:attribute name="lock-mode" type="lockMode" use="optional" default="read" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return-discriminator">
		<xs:complexType>
			<xs:attribute name="column" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return-scalar">
		<xs:complexType>
			<xs:attribute name="column" type="xs:string" use="required" />
			<xs:attribute name="type" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return-column">
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return-property">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="return-column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="column" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return-join">
		<xs:complexType>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="return-property" />
			</xs:choice>
			<xs:attribute name="alias" type="xs:string" use="required" />
			<xs:attribute name="property" type="xs:string" use="required" />
			<xs:attribute name="lock-mode" type="lockMode" use="optional" default="read" />
		</xs:complexType>
	</xs:element>
	<xs:element name="load-collection">
		<xs:complexType>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="return-property" />
			</xs:choice>
			<xs:attribute name="alias" type="xs:string" use="required" />
			<xs:attribute name="role" type="xs:string" use="required" />
			<xs:attribute name="lock-mode" type="lockMode" use="optional" default="read" />
		</xs:complexType>
	</xs:element>
	<xs:element name="synchronize">
		<xs:complexType>
			<xs:attribute name="table" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:element name="sql-query">
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="return" />
				<xs:element ref="return-scalar" />
				<xs:element ref="return-join" />
				<xs:element ref="load-collection" />
				<xs:element ref="synchronize" />
				<xs:element ref="query-param" />
			</xs:choice>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="resultset-ref" type="xs:string" use="optional" />
			<xs:attribute name="flush-mode" type="flushMode" use="optional" />
			<xs:attribute name="cache-mode" type="cacheMode" />
			<xs:attribute name="callable" type="xs:boolean" />
			<xs:attribute name="read-only" type="xs:boolean" />
			<xs:attribute name="timeout" type="xs:int" />
			<xs:attribute name="fetch-size" type="xs:int" />
			<xs:attribute name="cache-region" type="xs:string" />
			<xs:attribute name="cacheable" type="xs:boolean" />
		</xs:complexType>
	</xs:element>
	<xs:element name="list">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0">
					<xs:element ref="jcs-cache" />
					<xs:element ref="cache" />
				</xs:choice>
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="index" />
					<xs:element ref="list-index" />
				</xs:choice>
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
		</xs:complexType>
	</xs:element>
	<xs:element name="bag">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0">
					<xs:element ref="jcs-cache" />
					<xs:element ref="cache" />
				</xs:choice>
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:group ref="collectionCustomSQL" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
			<xs:attribute name="order-by" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="set">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0">
					<xs:element ref="jcs-cache" />
					<xs:element ref="cache" />
				</xs:choice>
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:group ref="collectionCustomSQL" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
			<xs:attribute name="order-by" type="xs:string" />
			<xs:attribute name="sort" type="xs:string" default="unsorted" />
		</xs:complexType>
	</xs:element>
	<xs:element name="map">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0">
					<xs:element ref="jcs-cache" />
					<xs:element ref="cache" />
				</xs:choice>
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="index" />
					<xs:element ref="composite-index" />
					<xs:element ref="index-many-to-many" />
					<xs:element ref="index-many-to-any" />
				</xs:choice>
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:group ref="collectionCustomSQL" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
			<xs:attribute name="order-by" type="xs:string" />
			<xs:attribute name="sort" type="xs:string" default="unsorted" />
		</xs:complexType>
	</xs:element>
	<xs:element name="type">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="cacheMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="get" />
			<xs:enumeration value="ignore" />
			<xs:enumeration value="normal" />
			<xs:enumeration value="put" />
			<xs:enumeration value="refresh" />
		</xs:restriction>
	</xs:simpleType>
	<xs:element name="union-subclass">
		<xs:annotation>
			<xs:documentation>A subclass in a table-per-concrete-class mapping</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:element ref="union-subclass" minOccurs="0" maxOccurs="unbounded" />
				<xs:group ref="classCustomSQL" />
			</xs:sequence>
			<xs:attributeGroup ref="baseClassAttributes" />
			<xs:attribute name="extends" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>Name of the root class. Required if the subclass is declared outside the declaration of its root class</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="schema" type="xs:string" use="optional" />
			<xs:attribute name="table" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>default: unqualified classname</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="check" type="xs:string" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="query-param">
		<xs:complexType>
			<xs:attribute name="name" type="xs:string" use="required" />
			<xs:attribute name="type" type="xs:string" use="required" />
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="ondelete">
		<xs:restriction base="xs:string">
			<xs:enumeration value="cascade" />
			<xs:enumeration value="noaction" />
		</xs:restriction>
	</xs:simpleType>
</xs:schema>